home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6457 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  880 b 

  1. Path: gryphon.phoenix.net!usenet
  2. From: brucew@phoenix.net (Bruce Wedding)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: changing strings via pointers
  5. Date: Sat, 24 Feb 1996 23:11:06 GMT
  6. Organization: BranPaul Systems
  7. Message-ID: <4go60d$g5d@gryphon.phoenix.net>
  8. References: <1996Feb22.125436.25503@leeds.ac.uk> <4gi8v4$alk@fcnews.fc.hp.com>
  9. NNTP-Posting-Host: dial105.phoenix.net
  10. X-Newsreader: Moe's Newsreader    
  11.  
  12. In comp.lang.c
  13. Rick Wells <rwells> wrote:
  14.  
  15. >>The thing is, I want to get rid of the "\n" and replace it with "\0", but
  16. >>obviously I can only do this using the pointer. I'm using the following code:
  17.  
  18. I learned a very simple way to do this from Jerry Coffin:
  19.  
  20. strtok( buf, "\n");
  21.  
  22.  
  23. Bruce D. Wedding                        Have Compiler, Will Travel!
  24.               Perspicacious Programming Performed Promptly
  25. Katy, Texas, USA, Planet Earth, Milkyway Galaxy, Known Universe
  26.  
  27.